Speed up CI setup to ~25-~40s with actions/cache use#34321
Closed
pantew869 wants to merge 3 commits intocommaai:masterfrom
Closed
Speed up CI setup to ~25-~40s with actions/cache use#34321pantew869 wants to merge 3 commits intocommaai:masterfrom
pantew869 wants to merge 3 commits intocommaai:masterfrom
Conversation
75986b2 to
f66aa76
Compare
c1c4b3a to
46a0c94
Compare
Contributor
|
The process replay job took 46s so this does not fully address the bounty or the sub-bounty requirements |
Comment on lines
+54
to
+59
| - id: docker-cache-restore | ||
| uses: ./.github/workflows/auto-cache | ||
| with: | ||
| path: .ci_cache/docker | ||
| restore-keys: docker-${{ hashFiles('Dockerfile.openpilot_base', 'tools/install_ubuntu_dependencies.sh', 'tools/install_python_dependencies.sh', 'uv.lock', '.github/workflows/setup/action.yaml') }} | ||
| key: docker-${{ hashFiles('Dockerfile.openpilot_base', 'tools/install_ubuntu_dependencies.sh', 'tools/install_python_dependencies.sh', 'uv.lock', '.github/workflows/setup/action.yaml') }} |
Contributor
There was a problem hiding this comment.
We don't want to do all that extra caching when using a namespace runner, aka when this condition is true: ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot')))
| if: steps.docker-cache-restore.outputs.cache-hit != 'true' | ||
| uses: actions/cache/save@v4 | ||
| env: | ||
| ZSTD_NBTHREADS: 0 |
Contributor
There was a problem hiding this comment.
That's interesting. How much does it affect the total setup time?
Contributor
|
This PR has had no activity for 9 days. It will be automatically closed in 2 days if there is no activity. |
Contributor
|
This PR has been automatically closed due to inactivity. Feel free to re-open once activity resumes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #30706
Github actions cache speed is quite inconsistent (varies from 50MB/s to 300+MB/s), so worst case scenario is ~40s.
Example run: https://github.com/commaai/openpilot/actions/runs/12552012526